package com.hotelManagerSystem.service.impl;

import com.hotelManagerSystem.model.Role;
import com.hotelManagerSystem.mapper.RoleMapper;
import com.hotelManagerSystem.service.IRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  角色服务实现类
 * </p>
 *
 * @author longyajr
 * @since 2021-12-22
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
    @Autowired
    private RoleMapper roleMapper;
    @Override
    public List<Role> queryRoleList() {
        return roleMapper.selectList(null);
    }

    @Override
    public List<Role> queryRoleListByUsername(String username) {
        return roleMapper.queryRoleListByUsername(username);
    }
}
